package requetes;

public class Deplacement
{
	public static final int INDEFINI 		= 1;
	public static final int MONTEE 			= 2;
	public static final int DESCENTE 		= 4;
	public int etage;
	public int sens;
	public int boutons;
	public boolean arrete;
		
	
	public Deplacement( int sens, int etage )
	{
		this.etage = etage;
		this.sens = sens;
		boutons = 0;
		arrete = true;
	}
		
	public void sens_montee()
	{
		sens = MONTEE;
		arrete = false;
	}
	public void sens_descente()
	{
		sens = DESCENTE;
		arrete = false;
	}
	public void sens_indefini()
	{
		sens = INDEFINI;
		arrete = true;
	}
	
	
	
	public boolean est_arrete()
	{
		return arrete;
	}
	
	public void change_etage()
	{
		if(sens==MONTEE){
			
			etage++;
			
		}else if( sens==DESCENTE ){
			
			etage--;
			
		}
	}
	
	
	
	public boolean monte()
	{
		return sens==MONTEE;
	}
	
	public boolean descend()
	{
		return sens==DESCENTE;
	}
	
}
